package com.teradata.olingo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by lyndon on 2018/6/8.
 */

@Controller
public class HomeController {

    /**
     * 跳转到主页
     */
    /*@RequestMapping(value = "/", method = RequestMethod.GET)
    public String index() {
        //获取菜单列表
        System.out.println("====");
        return "/index.jsp";
    }
*/
    @RequestMapping("/")
    public String home(ModelMap map){
        System.out.println("ssss");
        map.addAttribute("host", "http://blog.didispace.com");
        return "home";
    }

    @RequestMapping("/indexpage")
    public String indexPage(ModelMap map){
        System.out.println("ssss");
        map.addAttribute("host", "http://blog.didispace.com");
        map.addAttribute("name", "olingo-svc-spring");
        map.addAttribute("version", "1.0-SNAPSHOT");
        map.addAttribute("timestamp", "2018-06-11 17:37");
        return "index";
    }

}
